package cn.spring.chapter02.controller;

import cn.spring.chapter02.beans.Book;
import cn.spring.chapter02.beans.User;
import cn.spring.chapter02.beans.Users;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class HelloHttpsController {

    @Autowired
    Book book;
    @Autowired
    User user;
    @Autowired
    Users users;
    @GetMapping("/hello")
    public String hello(){
        return  "hello Word";
    }

    @GetMapping("/book")
    public  String book(){
        return  book.toString();
    }

    @GetMapping("/user")
    public  String user(){
        return  user.toString();
    }
    @GetMapping("/users")
    public  String users(){
        return  users.toString();
    }

}
